from typing import Optional
from typing import List

from pydantic import BaseModel, Field


class CircleTaskBean(BaseModel):
    start_time: Optional[str] = Field(None,description="开始时间，可为空，空则使用过去{time_before_now_m}分钟作为开始时间，start_time不为空则time_before_now_m不可用")
    exp: Optional[str] = Field(None,description="表达式可为空，空则使用配置文件的基础表达式")
    time_before_now_m: int = 10
    time_span_s: int | float = 10
    sleep_s: int = 10
    scene: List[str] = ["normal"]
